<template>
  <!-- 顶部组件 -->
  <AppNavbar></AppNavbar>
  <!-- 头部组件 -->
  <AppHeader />
  <!-- 吸顶容器 -->
  <AppHeaderSticky />
  <!-- 内容容器 -->
  <div class="main">
    <RouterView />
  </div>
  <!-- 底部组件 -->
  <AppFooter />
</template>

<script>
import AppNavbar from '@/components/AppNavbar.vue'
import AppHeader from '@/components/AppHeader.vue'
import AppFooter from '@/components/AppFooter.vue'
import AppHeaderSticky from '@/components/AppHeaderSticky.vue'
import { useStore } from 'vuex'
export default {
  name: 'Layout',
  components: {
    AppNavbar,
    AppHeader,
    AppFooter,
    AppHeaderSticky
  },
  setup() {
    const store = useStore()
    store.dispatch('category/getCategoryList')
  }
}
</script>

<style scoped lang="less">
.main {
  min-height: 500px;
}
</style>
